Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow to remove the package entity #437

Merged
merged 4 commits into from
Apr 7, 2023
Merged

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Apr 7, 2023

closes #435

@fengmk2 fengmk2 added the bug Something isn't working label Apr 7, 2023
@codecov
Copy link

codecov bot commented Apr 7, 2023

Codecov Report

Merging #437 (efc3b38) into master (c5ac715) will decrease coverage by 0.20%.
The diff coverage is 88.67%.

@@            Coverage Diff             @@
##           master     #437      +/-   ##
==========================================
- Coverage   97.27%   97.08%   -0.20%     
==========================================
  Files         156      156              
  Lines       14008    14055      +47     
  Branches     1797     1800       +3     
==========================================
+ Hits        13626    13645      +19     
- Misses        382      410      +28     
Impacted Files Coverage Δ
...ntroller/package/RemovePackageVersionController.ts 93.81% <88.67%> (-6.19%) ⬇️

... and 4 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@fengmk2 fengmk2 closed this Apr 7, 2023
@fengmk2 fengmk2 reopened this Apr 7, 2023
LANGUAGE: Chinese
MODEL:
top_p: 1
temperature: 1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这是一份 GitHub Actions 代码,用于触发 pull request 的事件并运行一个 test job。overall 看起来比较简单和直接。

代码中有两个 secrets(GITHUB_TOKEN和OPENAI_API_KEY) 用于访问和使用GitHub API 和 OpenAI API.

该代码还有一些可调参数,如可选语言 (LANGUAGE),以及 top_p 和 temperature 。其中top_p 和 temperature 是OpenAI的API参数,可以改变API生成文本的创造性程度。

由于描述信息不足,对于安全问题或者更好的改进无法提供反馈。

@@ -0,0 +1,23 @@
name: 🤖 ChatGPT Code Review
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -820,7 +820,7 @@ describe('test/port/controller/package/ShowPackageController.test.ts', () => {
.set('user-agent', publisher.ua + ' node/16.0.0')
.set('Accept', 'application/vnd.npm.install-v1+json');
assert(res.status === 404);
app.expectLog('[middleware:ErrorHandler][syncPackage] create sync package');
// app.expectLog('[middleware:ErrorHandler][syncPackage] create sync package');
});

it('should redirect public non-scope package to source registry if package not exists when redirectNotFound=true', async () => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这段代码的更改点是注释掉了一行日志输出语句,具体位置在 ShowPackageController.test.ts 文件的 820 行。在测试中调用一个不存在的包时,应该会返回 404 错误,并期望能够打印出相应的日志记录。这里将该输出都注释掉了。

关于代码风险与改进建议,需要更多上下文信息以判断是否存在潜在问题。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不稳定测试,先 skip 了。

@fengmk2 fengmk2 merged commit 613e0a1 into master Apr 7, 2023
@fengmk2 fengmk2 deleted the remove-package-by-pkgUrl branch April 7, 2023 02:33
fengmk2 pushed a commit that referenced this pull request Apr 7, 2023
[skip ci]

## [3.12.1](v3.12.0...v3.12.1) (2023-04-07)

### Bug Fixes

* allow to remove the package entity ([#437](#437)) ([613e0a1](613e0a1))
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

🎉 This PR is included in version 3.12.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

无法取消发布 package
1 participant